<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>订单详情</title>
    <script type="text/javascript">      
        //根据屏幕大小及dpi调整缩放和大小
        (function () {
            var scale = 1.0;
            var ratio = 1;
            if (window.devicePixelRatio >= 2) {
                scale *= 0.5;
                ratio *= 2;
            }
            var text = '<meta name="viewport" content="initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', width=device-width, user-scalable=no" />';
            document.write(text);
            document.documentElement.style.fontSize = 50 * ratio + "px";
        })();  
    </script>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />      
    <meta http-equiv="Pragma" content="no-cache" />      
    <meta http-equiv="Expires" content="0" />
    <link rel="stylesheet" href="./public/css/reset.css">
    <link rel="stylesheet" href="./public/css/common.css">
    <link rel="stylesheet" href="./public/css/order.css">
</head>

<body>
    <div class="order-page dn" id="J_order">
        <section class="detail-section">
            <div class="section-hd">
             订单信息
            </div>
            <div class="section-item">
                <div class="label">订单号:</div>
                <div class="cont">{{order.order_no}}</div>
            </div>
            <div class="section-item">
                <div class="label">订单状态:</div>
                <div class="cont" v-if="order.status==0">未支付</div>
                <div class="cont" v-if="order.status==1">已付款</div>
                <div class="cont" v-if="order.status==2">已提货</div>
                <div class="cont" v-if="order.status==3">使用中</div>
                <div class="cont" v-if="order.status==4 && order.type==0 ">已使用</div>
                <div class="cont" v-if="order.status==4 && order.type==1">已回收</div>
				<div class="cont" v-if="order.status==4 && order.type==2">已使用</div>
                 <!-- 0未支付,1已付款，2,已提货，3使用中，4已使用或已回收' -->
            </div>
            <div class="section-item"  v-if="order.type == 0 && order.is_card == 1">                
                <div class="label">核销数量:</div>
                <div class="cont">{{order.current_num}}</div>
            </div>
            <div class="section-item"  v-if="order.type == 0 && order.is_card == 0">                
              <div class="label">剩余次数:</div>
              <div class="cont">{{order.current_num}}</div>
          </div>
		  <div class="section-item"  v-if="order.type == 2">                
              <div class="label">订单金额:</div>
              <div class="cont">{{'￥' + order.price}}</div>
          </div>
            <div class="section-item" v-else>
                <div class="label">订单金额:</div>
                <div class="cont">{{order.is_card == 1 ? '' : '￥' + order.price}}</div>
            </div>
            <div class="section-item"  v-if="order.type == 0">
                <div class="label">产品名称:</div>
                <div class="cont">{{ order.is_card == 1 ? '嬉游通' : order.play.play_name}}</div>
            </div>
            <div class="section-item"   v-if="order.type == 1">
                <div class="label">产品信息:</div>
                <div class="cont">{{order.goods.goods_name}}</div>
            </div>
			<div class="section-item"  v-if="order.type == 2">
                <div class="label">产品名称:</div>
                <div class="cont">摇摇车</div>
            </div>
            <div class="section-item" v-if="order.type == 1">
                <div class="label">产品型号:</div>
                <div class="cont">{{order.goods.model}}</div>
            </div>
            <div class="section-item">
                <div class="label">购入时间:</div>
                <div class="cont">{{order.pay_time}}</div>
            </div>
            <div class="section-item" v-if="order.type != 2">
                <div class="label">有效时间:</div>
                <div class="cont">{{order.expire_time}}</div>
            </div>
            <div class="section-item" v-if="order.shop">
                <div class="label">关联店铺:</div>
                <div class="cont">{{order.shop}}</div>
            </div>
        </section>
        <section class="detail-section">
            <div class="section-hd">
                 买家信息
            </div>
            <div class="section-item">
                <div class="label">注册手机:</div>
                <div class="cont">{{order.phone}}</div>
            </div>
        </section>
        <div class="btn" v-if="order.type == 0 && order.status == 1 && show_btn" @click="hexiaoHandler('确认核销')">确认核销</div>
        <div class="btn" v-if="order.type == 0 && order.status == 3 && show_btn" @click="hexiaoHandler('确认核销')">确认核销</div>
        <div class="btn red-btn" v-if="order.type == 1 && order.status == 1 && show_btn"  @click="hexiaoHandler('确认提货')">确认提货</div>
        <div class="btn red-btn" v-if="order.type == 1 && order.status == 2 && show_btn"  @click="hexiaoHandler('确认回收')">确认回收</div>
        <div class="toast" v-if="error.show_error">
            <div class="toast_cont">{{error.msg}}</div>
        </div>
    </div>
    <script type="text/javascript" src="./public/js/lib/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="./public/js/lib/vue.min.js"></script>
    <script type="text/javascript" src="./public/js/src/md5.js"></script>
    <script>
            var links = ['./public/js/src/global.js', './public/js/src/order-detail.js']
            links.forEach(function(item) {
                document.write('<script type="text/javascript" src="' + item +'?ver=' + Math.random() +'"><\/script>')
            })
        </script>
</body>

</html>